from Interpreter import Interpreter
from Constant import DB



if __name__ == '__main__':

    DBNAME = 'knowledge'
    DB(DBNAME).delete_all()

    with open('cknow', mode='r', encoding='utf-8') as code:
        complier = Interpreter(DBNAME, code.read().split('//')[0])
        res = complier.run()

        print('code run end ,res is ')

        for i in res:
            print(i)